package com.qujia.station.mapper;

import com.qujia.station.domain.PhysicalCard;
import com.qujia.station.domain.dto.PhysicalCardListDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface PhysicalCardMapper {
    int deleteByPrimaryKey(Long id);

    int insert(PhysicalCard record);

    int insertSelective(PhysicalCard record);

    PhysicalCard selectByPrimaryKey(@Param("physicalCardNo") String physicalCardNo);

    PhysicalCard selectByPhysicalCardNo(@Param("physicalCardNo") String physicalCardNo);

    List<PhysicalCard> selectPhysicalCardList(PhysicalCardListDto physicalCardDto);

    int updateByPrimaryKeySelective(PhysicalCard record);

    int updateById(PhysicalCard record);

    int updateByPrimaryKey(PhysicalCard record);

    PhysicalCard selectByEnterpriseIdAndPhone(@Param("enterpriseId") Long enterpriseId, @Param("userPhone") String userPhone);

    List<PhysicalCard> selectPhysicalCardListByBatchId(@Param("batchId") String batchId);

    PhysicalCard judgeByPhysicalCardNo(@Param("physicalCardNo") String physicalCardNo);

    PhysicalCard selectFirstNumByBatchId(@Param("batchId") String batchId);

    int selectPhysicalCardNumByBatchId(@Param("batchId") String batchId);

    List<PhysicalCard> selectWithdrawList(PhysicalCardListDto physicalCardDto);

    List<PhysicalCard> selectPhysicalCardByAppUserId(@Param("appUserId") Integer appUserId);

    BigDecimal selectTotalBalanceAmt(PhysicalCardListDto physicalCardDto);

    PhysicalCard selectPhysicalCardByNo(@Param("physicalCardNo") String physicalCardNo);
}